/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.testis.orm.refinedclasses;

import org.testis.orm.classes.T_bed_devicegroup_details;

/**
 * 
 * @author selcuk
 */
public class DeviceGroupDetailRefined extends TestBedItem {

    private T_bed_devicegroup_details m_reference;

    public DeviceGroupDetailRefined(T_bed_devicegroup_details reference) {
	super();
	setReference(reference);
    }

    public int getId() {
	return m_reference.getId();
    }

    public String getName() {
	return m_reference.getName();
    }

    public String getMacAddress() {
	return m_reference.getMacAddress();
    }

    public TestPcRefined getPc() {
	// TODO: repository'deki TestPcRefined cekmek gerekiyor !!!
	return new TestPcRefined(m_reference.getPc());
    }

    private void setReference(T_bed_devicegroup_details reference) {
	if (reference == null) {
	    throw new NullPointerException();
	}
	m_reference = reference;
    }

    @Override
    public String toString() {
	return getName();
    }

    @Override
    public String getTypeName() {
	return "DeviceGroupDetail";
    }
}
